package com.bed.lovewithpatientbed.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * dept_manager
 * @author 
 */
public class DeptManager implements Serializable {
    private Integer deptManagerId;

    private String deptManagerName;

    private String deptManagerPhone;

    private Integer workerMessageId;

    private Integer hospitalManagerId;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date deptManagerDate;

    private Integer softdel;

    private Role role;

    private WorkerMessage workerMessage;

    private HospitalManager hospitalManager;

    public HospitalManager getHospitalManager() {
        return hospitalManager;
    }

    public void setHospitalManager(HospitalManager hospitalManager) {
        this.hospitalManager = hospitalManager;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public WorkerMessage getWorkerMessage() {
        return workerMessage;
    }

    public void setWorkerMessage(WorkerMessage workerMessage) {
        this.workerMessage = workerMessage;
    }

    private static final long serialVersionUID = 1L;

    public Integer getDeptManagerId() {
        return deptManagerId;
    }

    public void setDeptManagerId(Integer deptManagerId) {
        this.deptManagerId = deptManagerId;
    }

    public String getDeptManagerName() {
        return deptManagerName;
    }

    public void setDeptManagerName(String deptManagerName) {
        this.deptManagerName = deptManagerName;
    }

    public String getDeptManagerPhone() {
        return deptManagerPhone;
    }

    public void setDeptManagerPhone(String deptManagerPhone) {
        this.deptManagerPhone = deptManagerPhone;
    }

    public Integer getWorkerMessageId() {
        return workerMessageId;
    }

    public void setWorkerMessageId(Integer workerMessageId) {
        this.workerMessageId = workerMessageId;
    }

    public Integer getHospitalManagerId() {
        return hospitalManagerId;
    }

    public void setHospitalManagerId(Integer hospitalManagerId) {
        this.hospitalManagerId = hospitalManagerId;
    }

    public Date getDeptManagerDate() {
        return deptManagerDate;
    }

    public void setDeptManagerDate(Date deptManagerDate) {
        this.deptManagerDate = deptManagerDate;
    }

    public Integer getSoftdel() {
        return softdel;
    }

    public void setSoftdel(Integer softdel) {
        this.softdel = softdel;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeptManager other = (DeptManager) that;
        return (this.getDeptManagerId() == null ? other.getDeptManagerId() == null : this.getDeptManagerId().equals(other.getDeptManagerId()))
            && (this.getDeptManagerName() == null ? other.getDeptManagerName() == null : this.getDeptManagerName().equals(other.getDeptManagerName()))
            && (this.getDeptManagerPhone() == null ? other.getDeptManagerPhone() == null : this.getDeptManagerPhone().equals(other.getDeptManagerPhone()))
            && (this.getWorkerMessageId() == null ? other.getWorkerMessageId() == null : this.getWorkerMessageId().equals(other.getWorkerMessageId()))
            && (this.getHospitalManagerId() == null ? other.getHospitalManagerId() == null : this.getHospitalManagerId().equals(other.getHospitalManagerId()))
            && (this.getDeptManagerDate() == null ? other.getDeptManagerDate() == null : this.getDeptManagerDate().equals(other.getDeptManagerDate()))
            && (this.getSoftdel() == null ? other.getSoftdel() == null : this.getSoftdel().equals(other.getSoftdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDeptManagerId() == null) ? 0 : getDeptManagerId().hashCode());
        result = prime * result + ((getDeptManagerName() == null) ? 0 : getDeptManagerName().hashCode());
        result = prime * result + ((getDeptManagerPhone() == null) ? 0 : getDeptManagerPhone().hashCode());
        result = prime * result + ((getWorkerMessageId() == null) ? 0 : getWorkerMessageId().hashCode());
        result = prime * result + ((getHospitalManagerId() == null) ? 0 : getHospitalManagerId().hashCode());
        result = prime * result + ((getDeptManagerDate() == null) ? 0 : getDeptManagerDate().hashCode());
        result = prime * result + ((getSoftdel() == null) ? 0 : getSoftdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", deptManagerId=").append(deptManagerId);
        sb.append(", deptManagerName=").append(deptManagerName);
        sb.append(", deptManagerPhone=").append(deptManagerPhone);
        sb.append(", workerMessageId=").append(workerMessageId);
        sb.append(", hospitalManagerId=").append(hospitalManagerId);
        sb.append(", deptManagerDate=").append(deptManagerDate);
        sb.append(", softdel=").append(softdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}